package top.hzy520.sales.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.hzy520.sales.dao.SalesItemMapper;
import top.hzy520.sales.entity.ProductSku;
import top.hzy520.sales.entity.SalesItem;

import java.util.List;

/**
 * @Author: HouZeYu
 * @Description:
 * @Date: Created in 20:24 2018/6/27
 */
@Service
public class SalesServiceImpl implements SalesService {
    @Autowired
    private SalesItemMapper salesItemMapper;
    /**
    *@Author: HouZeYu
    *@Description: 查询一个商品参加的所有活动
    *@Date: 20:33 2018/6/27
    */
    @Override
    public List<SalesItem> findProductSkuSales(ProductSku productSku) {
      List<SalesItem> salesItemList=salesItemMapper.selectBySkuId(productSku.getId());
        return salesItemList;
    }
}
